Uses Shellapi;
ExitWindowsEx(ewx_Shutdown,0);    to shutdown
ExitWindowsEx(ewx_Reboot,0);    to restart